import {
  Column,
  PrimaryGeneratedColumn,
  CreateDateColumn
} from 'typeorm'
import { EntityModel } from '@midwayjs/orm'

@EntityModel('ie_user_role')
export class UserRole {

  @PrimaryGeneratedColumn()
  id: number;

  @Column({
    comment: '角色名称'
  })
  rolename: string;

  @Column({
    comment: '角色key',
    length: 32,
    unique: true,
    default: 'anonymous'
  })
  role: string;

  @CreateDateColumn({
    comment: '创建时间'
  })
  create_at: Date;
}
